package com.zhang.zhangapp.bean.shop;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2018/4/10.
 */

public class ShopDetail implements Parcelable {

    private String shopCode;
    private String perconsume;
    private String address;
    private String ranges;
    private Ticket ticket;
    private String addlat;
    private String shopName;
    private String areacode;
    private String typecode;
    private String consumecon;
    private String feature;
    private String phone;
    private String shopdetail;
    private String grade;
    private String doorpics;
    private String addlon;
    private List<Evaluate> evaluate;

    protected ShopDetail(Parcel in) {
        shopCode = in.readString();
        perconsume = in.readString();
        address = in.readString();
        ranges = in.readString();
        ticket = in.readParcelable(Ticket.class.getClassLoader());
        addlat = in.readString();
        shopName = in.readString();
        areacode = in.readString();
        typecode = in.readString();
        consumecon = in.readString();
        feature = in.readString();
        phone = in.readString();
        shopdetail = in.readString();
        grade = in.readString();
        doorpics = in.readString();
        addlon = in.readString();
        evaluate = in.createTypedArrayList(Evaluate.CREATOR);
    }

    public static final Creator<ShopDetail> CREATOR = new Creator<ShopDetail>() {
        @Override
        public ShopDetail createFromParcel(Parcel in) {
            return new ShopDetail(in);
        }

        @Override
        public ShopDetail[] newArray(int size) {
            return new ShopDetail[size];
        }
    };

    public void setShopCode(String shopCode) {
        this.shopCode = shopCode;
    }

    public String getShopCode() {
        return shopCode;
    }

    public void setPerconsume(String perconsume) {
        this.perconsume = perconsume;
    }

    public String getPerconsume() {
        return perconsume;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setRanges(String ranges) {
        this.ranges = ranges;
    }

    public String getRanges() {
        return ranges;
    }

    public void setTicket(Ticket ticket) {
        this.ticket = ticket;
    }

    public Ticket getTicket() {
        return ticket;
    }

    public void setAddlat(String addlat) {
        this.addlat = addlat;
    }

    public String getAddlat() {
        return addlat;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setAreacode(String areacode) {
        this.areacode = areacode;
    }

    public String getAreacode() {
        return areacode;
    }

    public void setTypecode(String typecode) {
        this.typecode = typecode;
    }

    public String getTypecode() {
        return typecode;
    }

    public void setConsumecon(String consumecon) {
        this.consumecon = consumecon;
    }

    public String getConsumecon() {
        return (consumecon == null || consumecon.equals("")) ? "10" : consumecon;
    }

    public void setFeature(String feature) {
        this.feature = feature;
    }

    public String getFeature() {
        return feature;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setShopdetail(String shopdetail) {
        this.shopdetail = shopdetail;
    }

    public String getShopdetail() {
        return shopdetail;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getGrade() {
        return grade;
    }

    public void setDoorpics(String doorpics) {
        this.doorpics = doorpics;
    }

    public String getDoorpics() {
        return doorpics;
    }

    public void setAddlon(String addlon) {
        this.addlon = addlon;
    }

    public String getAddlon() {
        return addlon;
    }

    public void setEvaluate(List<Evaluate> evaluate) {
        this.evaluate = evaluate;
    }

    public List<Evaluate> getEvaluate() {
        return evaluate;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(shopCode);
        parcel.writeString(perconsume);
        parcel.writeString(address);
        parcel.writeString(ranges);
        parcel.writeParcelable(ticket, i);
        parcel.writeString(addlat);
        parcel.writeString(shopName);
        parcel.writeString(areacode);
        parcel.writeString(typecode);
        parcel.writeString(consumecon);
        parcel.writeString(feature);
        parcel.writeString(phone);
        parcel.writeString(shopdetail);
        parcel.writeString(grade);
        parcel.writeString(doorpics);
        parcel.writeString(addlon);
        parcel.writeTypedList(evaluate);
    }
}
